import { message } from "antd";
import instance from "../utils/request";
import { setToken } from "../utils/tools";
//实现编程时跳转
import { useNavigate } from "react-router-dom";
/**
 * 登录请求
 * @param data
 * @returns
 */
type logindata = {
  userName: string;
  password: string;
};
// eslint-disable-next-line react-hooks/rules-of-hooks

export const loginAPI = (data: logindata) =>
  instance.post("/api/v1/auth/manager_login", data)